From bfe8a79541253bccea6cd5633d80b4da6673aad5 Mon Sep 17 00:00:00 2001 From: "iap10@labyrinth.cl.cam.ac.uk" Date: Wed, 5 Jan 2005 21:27:20 +0000 Subject: [PATCH] bitkeeper revision 1.1159.213.2 (41dc5bb8NoFeyC8xMcZdstILsQ-Tqg) patch from Leendert van Doorn Hyperthreading on VMX is broken in the xeno-unstable.bk tree. The diff below fixes this. It turns out that the mtrr code clears too many bits, some of them cause Xen to crash. Being a bit more precise fixes the problem. --- xen/arch/x86/mtrr/generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/mtrr/generic.c b/xen/arch/x86/mtrr/generic.c index 8da0c5b43c..93d35350a7 100644 --- a/xen/arch/x86/mtrr/generic.c +++ b/xen/arch/x86/mtrr/generic.c @@ -250,7 +250,7 @@ static void prepare_set(void) /* Save value of CR4 and clear Page Global Enable (bit 7) */ if ( cpu_has_pge ) { cr4 = read_cr4(); - write_cr4(cr4 & (unsigned char) ~(1 << 7)); + write_cr4(cr4 & ~X86_CR4_PGE); } /* Flush all TLBs via a mov %cr3, %reg; mov %reg, %cr3 */ -- 2.30.2